Artificial intelligence based method and apparatus for checking text

ABSTRACT

This disclosure discloses an artificial intelligence based method and apparatus for checking a text. An embodiment of the method comprises: lexing a first to-be-checked text and a second to-be-checked text respectively, determining word vectors of the lexed words to generate a first word vector sequence and a second word vector sequence; inputting the first word vector sequence and the second word vector sequence respectively into a pre-trained convolutional neural network containing at least one multi-scale convolutional layer, identifying vector sequences in a plurality of vector sequences outputted by a last multi-scale convolutional layer as eigenvector sequences, to obtain eigenvector sequence groups respectively corresponding to the texts; combining eigenvector sequences in each eigenvector sequence group to generate a combined eigenvector sequence; and analyzing the generated combined eigenvector sequences to determine whether the first text and the second text pass a similarity check. The embodiment improves the flexibility in checking a text.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is related to and claims priority from Chinese PatentApplication No. 201710404268.5, filed with the State IntellectualProperty Office (SIPO) of the People's Republic of China on Jun. 1,2017, the entire disclosure of the Chinese application is herebyincorporated by reference.

TECHNICAL FIELD

This disclosure relates to the field of computer technology,specifically to the field of Internet technology, and more specificallyto an artificial intelligence based method and apparatus for checking atext.

BACKGROUND

Artificial intelligence (AI) is a new technical science on research anddevelopment of theories, methodologies, technologies and applicationsystems for simulating and extending human intelligence. Artificialintelligence is a branch of computer science, attempts to understand theessence of intelligence, and produces a new intelligent machine that maymake a response in a form similar to human intelligence. The research inthis field includes robots, speech recognition, image recognition,natural language processing, expert systems, etc. Natural languageprocessing in the field of artificial intelligence is an importantdirection in the field of computer science and in the field ofartificial intelligence. It researches various theories and methods thatmay realize effective communication between human and computer using anatural language. Usually, it is necessary to check text similarity orthe like using a convolutional neural network (CNN).

However, the convolutional neural network used in existing methodsusually only supports convolution in a fixed scale (i.e., the number ofvectors inputted into a convolution kernel of a convolutional layer ofthe convolutional neural network each time, also known as a windowlength), thus having a problem of relatively low flexibility in checkinga text.

SUMMARY

An object of embodiments of this disclosure is to provide an improvedartificial intelligence based method and apparatus for checking a text,so as to solve the technical problem mentioned in the above backgroundpart.

In a first aspect, an embodiment of this disclosure provides anartificial intelligence based method for checking a text, the methodincluding: lexing a first to-be-checked text and a second to-be-checkedtext respectively, determining word vectors of the lexed words togenerate a first word vector sequence corresponding to the first textand a second word vector sequence corresponding to the second text;inputting the first word vector sequence and the second word vectorsequence respectively into a pre-trained convolutional neural networkcontaining at least one multi-scale convolutional layer, identifyingvector sequences in a plurality of vector sequences outputted by a lastmulti-scale convolutional layer in the at least one multi-scaleconvolutional layer as eigenvector sequences, to obtain eigenvectorsequence groups respectively corresponding to the texts, wherein theconvolutional neural network is used for extracting characteristics oftexts; combining eigenvector sequences in the identified eigenvectorsequence group corresponding to each text to generate a combinedeigenvector sequence corresponding to the each text; and analyzing thegenerated combined eigenvector sequences to determine whether the firsttext and the second text pass a similarity check.

In some embodiments, the analyzing the generated combined eigenvectorsequences to determine whether the first text and the second text pass asimilarity check includes: extracting, for each text, a maximum value ineach dimension of the eigenvectors contained in a combined eigenvectorsequence corresponding to the each text, to generate a targeteigenvector corresponding to the each text; and determining whether thefirst text and the second text pass the similarity check based on thegenerated target eigenvectors corresponding to the texts.

In some embodiments, the determining whether the first text and thesecond text pass the similarity check based on the generated targeteigenvectors corresponding to the texts includes: inputting thegenerated target eigenvectors into a pre-trained similarity predictionmodel to obtain similarity prediction result of the first text and thesecond text, wherein the similarity prediction model is used forcharacterizing a corresponding relationship between target eigenvectorsequences of a plurality of texts and similarity prediction results ofthe plurality of texts; and determining whether the first text and thesecond text pass the similarity check based on the obtained similarityprediction result.

In some embodiments, the method further includes training the similarityprediction model, including: extracting a preset training sample,wherein the training sample includes a first training text, a secondtraining text, and an identifier for indicating whether the firsttraining text is similar to the second training text; analyzing thefirst training text and the second training text to generate targeteigenvectors respectively corresponding to the first training sample andthe second training sample; and obtaining the similarity predictionmodel by training using a machine learning method, using the targeteigenvectors respectively corresponding to the first training sample andthe second training sample as inputs, and using the identifier as aninput.

In some embodiments, the determining whether the first text and thesecond text pass the similarity check based on the generated targeteigenvectors corresponding to the texts includes: determining asimilarity between a target eigenvector corresponding to the first textand a target eigenvector corresponding to the second text; anddetermining the first text and the second text passing the similaritycheck in response to determining the similarity being greater than apreset similarity threshold; determining the first text and the secondtext failing to pass the similarity check in response to determining thesimilarity being not greater than the similarity threshold.

In some embodiments, a deep coherent layer and a pooling layer arearranged between adjacent multi-scale convolutional layers in the atleast one multi-scale convolutional layer, the deep coherent layer isused for combining a plurality of vector sequences outputted by themulti-scale convolutional layer to generate a combined vector sequenceconsisting of a plurality of combined vectors, and the pooling layer isused for analyzing the combined vector sequence generated by the deepcoherent layer in a preset window size and a preset window sliding steplength to obtain a simplified combined vector sequence.

In a second aspect, an embodiment of this disclosure provides anartificial intelligence based apparatus for checking a text, theapparatus including: a lexer unit, configured for lexing a firstto-be-checked text and a second to-be-checked text respectively,determining word vectors of the lexed words to generate a first wordvector sequence corresponding to the first text and a second word vectorsequence corresponding to the second text; an input unit, configured forinputting the first word vector sequence and the second word vectorsequence respectively into a pre-trained convolutional neural networkcontaining at least one multi-scale convolutional layer, identifyingvector sequences in a plurality of vector sequences outputted by a lastmulti-scale convolutional layer in the at least one multi-scaleconvolutional layer as eigenvector sequences, to obtain eigenvectorsequence groups respectively corresponding to the texts, wherein theconvolutional neural network is used for extracting characteristics oftexts; a combination unit, configured for combining eigenvectorsequences in the identified eigenvector sequence group corresponding toeach text to generate a combined eigenvector sequence corresponding tothe each text; and an analysis unit, configured for analyzing thegenerated combined eigenvector sequences to determine whether the firsttext and the second text pass a similarity check.

In some embodiments, the analysis unit includes: a generation module,configured for extracting, for each text, a maximum value in eachdimension of the eigenvectors contained in a combined eigenvectorsequence corresponding to the each text, to generate a targeteigenvector corresponding to the each text; and a determination module,configured for determining whether the first text and the second textpass the similarity check based on the generated target eigenvectorscorresponding to the texts.

In some embodiments, the determination module is further configured for:inputting the generated target eigenvectors into a pre-trainedsimilarity prediction model to obtain similarity prediction result ofthe first text and the second text, wherein the similarity predictionmodel is used for characterizing a corresponding relationship betweentarget eigenvector sequences of a plurality of texts and similarityprediction results of the plurality of texts; and determining whetherthe first text and the second text pass the similarity check based onthe obtained similarity prediction result.

In some embodiments, the apparatus further includes: an extraction unit,configured for extracting a preset training sample, wherein the trainingsample includes a first training text, a second training text, and anidentifier for indicating whether the first training text is similar tothe second training text; a generation unit, configured for analyzingthe first training text and the second training text to generate targeteigenvectors respectively corresponding to the first training sample andthe second training sample; and a training unit, configured forobtaining the similarity prediction model by training using a machinelearning method, using the target eigenvectors respectivelycorresponding to the first training sample and the second trainingsample as inputs, and using the identifier as an input.

In some embodiments, the determination module is further configured for:determining a similarity between a target eigenvector corresponding tothe first text and a target eigenvector corresponding to the secondtext; and determining the first text and the second text passing thesimilarity check in response to determining the similarity being greaterthan a preset similarity threshold; determining the first text and thesecond text failing to pass the similarity check in response todetermining the similarity being not greater than the similaritythreshold.

In some embodiments, a deep coherent layer and a pooling layer arearranged between adjacent multi-scale convolutional layers in the atleast one multi-scale convolutional layer, the deep coherent layer isused for combining a plurality of vector sequences outputted by themulti-scale convolutional layer to generate a combined vector sequenceconsisting of a plurality of combined vectors, and the pooling layer isused for analyzing the combined vector sequence generated by the deepcoherent layer in a preset window size and a preset window sliding steplength to obtain a simplified combined vector sequence.

In a third aspect, an embodiment of this disclosure provides a server,including one or more processors; and a storage device for storing oneor more programs, where the one or more programs, when executed by theone or more processors, enable the one or more processors to implement amethod, e.g., an artificial intelligence based method for checking atext, according to any one embodiment.

The artificial intelligence based method and apparatus for checking atext provided in an embodiment of this disclosure lex a firstto-be-checked text and a second to-be-checked text respectively togenerate a first word vector sequence and a second word vector sequence,input the first word vector sequence and the second word vector sequencerespectively into a pre-trained convolutional neural network containingat least one multi-scale convolutional layer to obtain eigenvectorsequence groups respectively corresponding to the texts, combineeigenvector sequences to generate combined eigenvector sequencescorresponding to the texts; and finally analyze the generated combinedeigenvector sequences to determine whether the first text and the secondtext pass a similarity check, thereby implementing calculation ofmulti-scale convolution of word vector sequences, and improving theflexibility in checking a text relative to the calculation of a singlefixed-scale convolution.

BRIEF DESCRIPTION OF THE DRAWINGS

By reading and referring to the detailed description of non-limitingembodiments provided in the accompanying drawings, other features,objects and advantages of the disclosure will become clearer:

FIG. 1 is an illustrative system structure diagram where the disclosuremay be applied;

FIG. 2 is a flow diagram of an embodiment of a method for checking atext according to the disclosure;

FIG. 3 is a structural diagram of a convolutional neural networkaccording to the disclosure;

FIG. 4 is a schematic diagram of an application scenario of a method forchecking a text according to the disclosure;

FIG. 5 is a flow diagram of another embodiment of a method for checkinga text according to the disclosure;

FIG. 6 is a structural diagram of an embodiment of an apparatus forchecking a text according to the disclosure; and

FIG. 7 is a structural diagram of a computer system of a serverapplicable for implementing embodiments of the disclosure.

DETAILED DESCRIPTION OF EMBODIMENTS

The present application will be further described below in detail incombination with the accompanying drawings and the embodiments. Itshould be appreciated that the specific embodiments described herein aremerely used for explaining the relevant disclosure, rather than limitingthe disclosure. In addition, it should be noted that, for the ease ofdescription, only the parts related to the relevant disclosure are shownin the accompanying drawings.

It should also be noted that the embodiments in the present applicationand the features in the embodiments may be combined with each other on anon-conflict basis. The present application will be described below indetail with reference to the accompanying drawings and in combinationwith the embodiments.

FIG. 1 shows an illustrative architecture of a system 100 which may beused by a method for checking a text or an apparatus for checking a textaccording to the embodiments of the present application.

As shown in FIG. 1, the system architecture 100 may include terminaldevices 101, 102 and 103, a network 104 and a server 105. The network104 serves as a medium providing a communication link between theterminal devices 101, 102 and 103 and the server 105. The network 104may include various types of connections, such as wired or wirelesstransmission links, or optical fibers.

The user 110 may use the terminal devices 101, 102 and 103 to interactwith the server 105 through the network 104, in order to transmit orreceive messages, etc. Various communication client applications, suchas text editing applications, web browser applications, and readerapplications may be installed on the terminal devices 101, 102 and 103.

The terminal devices 101, 102 and 103 may be various electronic deviceshaving a display and capable of browsering a text, including but notlimited to, smart phones, tablet computers, e-book readers, laptopcomputers and desktop computers.

The server 105 may be a server providing various services, e.g., aprocessing server providing similarity check and other services forto-be-checked texts stored on the terminal devices 101, 102 and 103. Theprocessing server may process texts by lex, analysis, etc., and generateprocessed results (e.g., text check result for indicating whetherpassing the similarity check or not).

It should be noted that the to-be-checked texts may also be directlylocally stored on the server 105, which may directly extract and processthe locally stored to-be-checked texts. Under the circumstance, theterminal devices 101, 102 and 103 and the network 104 may not exist.

It should be noted that the method for checking a text provided in anembodiment of the disclosure is generally executed by the server 105,and correspondingly, the apparatus for checking a text is generallyarranged within the server 105.

It should be understood that the numbers of terminal devices, networksand servers in FIG. 1 are only indicative. Depending on the actualneeds, any numbers of terminal devices, networks and servers may exist.

Further referring to FIG. 2, a flow process 200 of an embodiment of amethod for checking a text according to this disclosure is shown. Themethod for checking a text includes the following steps:

Step 201, lexing a first to-be-checked text and a second to-be-checkedtext respectively, determining word vectors of the lexed words togenerate a first word vector sequence corresponding to the first textand a second word vector sequence corresponding to the second text.

In this embodiment, an electronic device (e.g., the server 105 shown inFIG. 1) on which a method for checking a text runs may first extract afirst to-be-checked text and a second to-be-checked text, where thefirst text and the second text may be texts pre-stored in the electronicdevice and pre-assigned by technical personnel, and the electronicdevice may directly extract the locally pre-stored texts. In addition,the first text and the second text may also be texts received by theelectronic device from clients (e.g., the terminal devices 101, 102 and103 shown in FIG. 1) through wired connection or wireless connection. Inpractice, the clients may send a request for checking texts, includingthe first text and the second text, to the electronic device, which may,upon receiving the request for checking texts, extract the textscontained in the request for checking texts. It should be noted that thefirst text and the second text may be a variety of text messages, e.g.,sentences, paragraphs, writings or the like. It should be noted that thewireless connection may include, but is not limited to, 3G/4Gconnection, WiFi connection, bluetooth connection, WiMAX connection,Zigbee connection, UWB (ultra wideband) connection, and other wirelessconnections that are known at present or will be developed in thefuture.

In this embodiment, the electronic device may lex the first text and thesecond text using a variety of lex methods; and then determine wordvectors of the lexed words using a variety of word vector generationmethods, to generate a first word vector sequence corresponding to thefirst text and a second word vector sequence corresponding to the secondtext. It should be noted that a word vector may be a vector for showingword characteristics, and a value in each dimension of the word vectorrepresents a characteristic having a certain semantic and grammaticalexplanation, where the characteristic may be a variety of informationfor characterizing basic elements of a word. It should be noted that theelectronic device may sequentially arrange word vectors of the wordsobtained by the lexing of the first text to obtain the first word vectorsequence, and sequentially arrange word vectors of the words obtained bythe lexing of the second text to obtain the second word vector sequence.In practice, the first word vector sequence and the second word vectorsequence each may be regarded as a matrix consisting of sequentiallyarranged word vectors.

In this embodiment, the electronic device may lex the first text and thesecond text using a variety of lex methods. As an example, the lexmethod may be a statistical-based lex method, and specifically maysummarize a frequency of a character combination consisting of adjacentcharacters in the first text and the second text to calculate afrequency of occurrence of the character combination. When the frequencyis higher than a preset frequency threshold, then it is determined thatthe combination forms a word, thereby implementing lexing of a text. Asanother example, the lex method may further be a string matchingprinciple based lex method. The electronic device may match the firsttext and the second text with words in a mechanical dictionary preset inthe electronic device using a string matching principle, and then lexthe texts based on the matched words. The string matching principletherein may be a forward maximum matching method, a backward maximummatching method, a segmentation mark setting method, a word-by-wordtraversal matching method, a forward optimum matching method, a backwardoptimum matching method, or the like. It should be noted that theelectronic device may also lex the first text and the second text usinga Hidden Markov Model (HMM) or the like. It should be noted that theabove lex methods are prior arts which are widely researched and appliedat present, and are not repeated any more herein.

In this embodiment, the electronic device may determine word vectors ofthe lexed words using a variety of word vector generation methods. As anexample, the electronic device may pre-store a list of correspondencerelationships between lots of words and word vectors, and the wordvectors may have an identical number of dimensions. For a word vector ofeach lexed word, the electronic device may find a word vectorcorresponding to the word from the list of corresponding relationships.Herein, the pre-stored word vectors of lots of words may be obtained bypre-training using a machine learning method, or pre-set by technicalpersonnel based on lots of statistical data. As another example, theelectronic device may determine the word vectors of the lexed wordsusing various open-source word vector calculation tools (e.g., word2vec,etc.). It should be noted that the above word vector generation methodsare prior arts which are widely researched and applied at present, andare not repeated any more herein.

Step 202, inputting the first word vector sequence and the second wordvector sequence respectively into a pre-trained convolutional neuralnetwork containing at least one multi-scale convolutional layer,identifying vector sequences in a plurality of vector sequencesoutputted by a last multi-scale convolutional layer in the at least onemulti-scale convolutional layer as eigenvector sequences, to obtaineigenvector sequence groups respectively corresponding to the texts.

In this embodiment, the electronic device may store a pre-trainedconvolutional neural network containing at least one multi-scaleconvolutional layer, where the convolutional neural network may be usedfor extracting characteristics of texts, and the multi-scaleconvolutional layer may output a plurality of vector sequences. Theelectronic device may first input the first word vector sequence and thesecond word vector sequence respectively into a pre-trainedconvolutional neural network, and then identify vector sequences in aplurality of vector sequences outputted by a last multi-scaleconvolutional layer in the at least one multi-scale convolutional layeras eigenvector sequences, to obtain eigenvector sequence groupsrespectively corresponding to the texts, where an eigenvector groupcorresponding to the first text consists of a plurality of eigenvectorsequences outputted by the last multi-scale convolutional layer afterinputting the first word vector sequence into the convolutional neuralnetwork, and an eigenvector group corresponding to the second textconsists of a plurality of eigenvector sequences outputted by the lastmulti-scale convolutional layer after inputting the second word vectorsequence into the convolutional neural network. In practice, theconvolutional neural network is a feedforward neural network, artificialneuron of which may respond to peripheral units within a part ofcoverage area, and has outstanding performance for text processing.

It should be noted that each multi-scale convolutional layer in thepre-trained convolutional neural network may consist of convolutionallayers in a plurality of scales, where convolutional layers in eachscale have different window lengths (i.e., the number of vectorsinputted into a convolution kernel each time is different; theconvolution kernel is a parameter matrix, and may also be known as afilter), there may be one or more convolutional layers in each scale,and the convolutional layers in the each scale may be used forconvoluting the inputted vector sequences based on the window lengthscorresponding to the convolutional layers in the each scale. It shouldbe noted that the convolutional layers may be used for calculatingconvolution of the inputted vector sequences based on the correspondingwindow lengths. Each convolutional layer may contain any number ofconvolution kernels. For each convolutional layer, after convolution ofthe inputted vector sequences is calculated, the convolutional layer mayoutput another vector sequence, where dimension of the vectors containedin the outputted vector sequence is the number of convolution kernels inthe convolutional layer, and the number of the contained vectors isidentical to the number of the vectors contained in the inputted vectorsequences. Because each multi-scale convolutional layer consists ofconvolutional layers in a plurality of scales, each multi-scaleconvolutional layer may output a plurality vector sequences.

As an example, referring to FIG. 3, a structural diagram 300 of theconvolutional neural network is shown. A multi-scale convolutional layer301 of the convolutional neural network includes a first convolutionallayer, a second convolutional layer, a third convolutional layer, afourth convolutional layer and a fifth convolutional layer, where thewindow length of the first convolutional layer, the second convolutionallayer and the fourth convolutional layer is 1, that of the thirdconvolutional layer is 3, and that of the fifth convolutional layer is5; and the number of the convolution kernels in the first convolutionallayer, the second convolutional layer, the third convolutional layer,the fourth convolutional layer and the fifth convolutional layer isrespectively A, B, C, D and E, where A, B, C, D and E each are apositive integer. A vector sequence (e.g., consisting of 100 vectors) tobe inputted into the multi-scale convolutional layer may be used as atarget vector sequence. Three routes shown in FIG. 3 process the targetvector sequence in parallel to obtain three outputted vector sequences.Specifically, the target vector sequence is inputted into a first route,i.e., inputted into the first convolutional layer, to obtain a vectorsequence consisting of 100 vectors in the dimension A through thecalculation of convolution based on a window length of 1. Moreover, thetarget vector sequence is inputted into a second route, i.e., inputtedinto the second convolutional layer, to obtain a vector sequenceconsisting of 100 vectors in the dimension B through the calculation ofconvolution based on a window length of 1; and then a vector sequenceconsisting of the obtained vectors in the dimension B is inputted intothe third convolutional layer, to obtain a vector sequence consisting of100 vectors in the dimension C through the calculation of convolutionbased on a window length of 3. Moreover, the target vector sequence isinputted into a third route, i.e., inputted into the fourthconvolutional layer, to obtain a vector sequence consisting of 100vectors in the dimension D through the calculation of convolution basedon a window length of 1; and then a vector sequence consisting of theobtained vectors in the dimension D is inputted into the fifthconvolutional layer, to obtain a vector sequence consisting of 100vectors in the dimension E through the calculation of convolution basedon a window length of 5. Finally, the multi-scale convolutional layer301 outputs the vector sequence consisting of 100 vectors in thedimension A, the vector sequence consisting of 100 vectors in thedimension C, and the vector sequence consisting of 100 vectors in thedimension E.

Step 203, combining eigenvector sequences in the identified eigenvectorsequence group corresponding to each text to generate a combinedeigenvector sequence corresponding to the each text.

In this embodiment, the electronic device may combine eigenvectorsequences in the identified eigenvector sequence group corresponding toeach text (i.e., each text in the first text and the second text) togenerate a combined eigenvector sequence corresponding to the each text.Specifically, the electronic device may determine, for each text, anorder of vectors forming eigenvector sequences corresponding to the eachtext in the corresponding eigenvector sequences, combine vectors in anidentical order in the eigenvector sequences into a vector, and use thecombined vector as a combined eigenvector, to generate a combinedeigenvector sequence corresponding to the each text.

As an example, an eigenvector group corresponding to the first textincludes a first eigenvector sequence consisting of 100 vectors in adimension M, a second eigenvector sequence consisting of 100 vectors ina dimension N and a third eigenvector sequence consisting of 100 vectorsin a dimension P, where the M, N and P each are a positive integer. Theelectronic device may combine first vectors respectively in the firsteigenvector sequence, the second eigenvector sequence and the thirdeigenvector sequence, to obtain a vector in a dimension M+N+P; thencombine second vectors respectively in the first eigenvector sequence,the second eigenvector sequence and the third eigenvector sequence, toobtain another vector in the dimension M+N+P; and finally obtain 100vectors in the dimension M+N+P in the same manner. The electronic devicemay identify the obtained combined vectors as a combined eigenvector, toobtain a combined eigenvector sequence corresponding to the first text.It should be noted that a combined eigenvector sequence corresponding tothe second text is generated in the same manner as that in the example,and is not repeated any more herein.

Step 204, analyzing the generated combined eigenvector sequences todetermine whether the first text and the second text pass a similaritycheck.

In this embodiment, the electronic device may implement numericalanalysis of the generated combined eigenvector sequences using a varietyof analysis methods to determine whether the first text and the secondtext pass a similarity check. As an example, the electronic device mayinput the combined eigenvector sequence corresponding to the first textand the combined eigenvector sequence corresponding to the second textrespectively into a pre-trained neural network containing a plurality offully connected layers, identify a value outputted by the neural networkas a similarity check result, and then determine the first text and thesecond text passing a similarity check if the value is greater than apreset value (e.g., 0.5 or 0.8 or the like); determine the first textand the second text failing to pass the similarity check if the value isnot greater than the preset value. Here, each fully connected layer ofthe neural network may be used first for linear transformation of datainputted into the each fully connected layer, and then for non-lineartransformation (e.g., using a Softmax function, a sigmoid function orother non-linear activation functions), to obtain output of the eachfully connected layer. It should be noted that the neural network may beobtained by supervised pre-training using a machine learning method, andthe method of training the fully connected layer of the neural networkis a prior art which is widely researched and applied at present, and isnot repeated any more herein.

As another example, the electronic device may determine, for each text,an average value in each dimension of the eigenvectors contained in thecombined eigenvector sequence corresponding to the each text, identify avector consisting of the average value in each dimension as an averageeigenvector corresponding to the each text, and then implement numericalanalysis of the obtained average eigenvectors corresponding to the texts(e.g., calculating a similarity between two average eigenvectors), todetermine whether the first text and the second text pass the similaritycheck.

In some optional modes of implementing this embodiment, the electronicdevice may first extract, for each text, a maximum value in eachdimension of the eigenvectors contained in a combined eigenvectorsequence corresponding to the each text, and identify vectors consistingof the extracted maximum value in each dimension as a target eigenvectorcorresponding to the each text, to obtain a target eigenvectorcorresponding to the first text and a target eigenvector correspondingto the second text. Then the electronic device may determine whether thefirst text and the second text pass a similarity check based on thegenerated target eigenvectors corresponding to the texts. As an example,the electronic device may determine a similarity between the targeteigenvector corresponding to the first text and the target eigenvectorcorresponding to the second text using a variety of similaritycalculation methods (e.g., a cosine similarity algorithm, a Euclideandistance algorithm, a Jaccard similarity measure method, or the like).Then the electronic device determines the first text and the second textpassing a similarity check in response to determining the similaritybeing greater than a preset similarity threshold; determines the firsttext and the second text failing to pass the similarity check inresponse to determining the similarity being not greater than thesimilarity threshold, where the similarity threshold may be any value,e.g., 0.5, 0.8 or the like. It should be noted that the similaritycalculation methods are prior arts which are widely researched andapplied at present, and are not repeated any more herein.

Further referring to FIG. 4, a schematic diagram 400 of an applicationscenario of a method for checking a text according to this embodiment isshown. In the application scenario of FIG. 4, a user edits a firstto-be-checked text and a second to-be-checked text respectively in aform 401 and in a form 402 using a browser installed on a terminaldevice. Then after the edited texts are submitted, a processing serverproviding a similarity check service of the texts submitted by the userlexes the received first text and the received second text respectively,to obtain a first word vector sequence and a second word vectorsequence, inputs the first word vector sequence and the second wordvector sequence respectively into a pre-trained convolutional neuralnetwork containing at least one multi-scale convolutional layer toobtain eigenvector sequence groups corresponding to the texts, combineseigenvector sequences in each eigenvector sequence group to obtaineigenvector sequences corresponding to the texts, and finally analyzesthe generated combined eigenvector sequences to determine whether thefirst text and the second text pass a similarity check, and sends thetext check result to the terminal device. The terminal device presentsthe text check result 403.

The method provided in the embodiments of the disclosure lexes a firstto-be-checked text and a second to-be-checked text to generate a firstword vector sequence and a second word vector sequence, inputs the firstword vector sequence and the second word vector sequence respectivelyinto a pre-trained convolutional neural network containing at least onemulti-scale convolutional layer to obtain eigenvector sequence groupsrespectively corresponding to the texts, combines eigenvector sequencesto generate combined eigenvector sequences corresponding to the texts,and finally analyzes the generated combined eigenvector sequences todetermine whether the first text and the second text pass a similaritycheck, thereby implementing the calculation of multi-scale convolutionof word vector sequences and improving the flexibility in checking atext relative to calculation of single fixed-scale convolution.Moreover, because of using calculation of multi-scale convolution, theability to extract characteristics of texts is enhanced, and then theaccuracy in checking a text similarity is improved.

Further referring to FIG. 5, a flow process 500 of another embodiment ofa method for checking a text is shown. The flow process 500 of themethod for checking a text includes the following steps:

Step 501, lexing a first to-be-checked text and a second to-be-checkedtext respectively, determining word vectors of the lexed words togenerate a first word vector sequence corresponding to the first textand a second word vector sequence corresponding to the second text.

In this embodiment, the electronic device on which the method forchecking a text runs (e.g., the server 105 shown in FIG. 1) may firstextract a first to-be-checked text and a second to-be-checked text, maylex the first text and the second text using a variety of lex methods;and then determine word vectors of the lexed words to generate a firstword vector sequence corresponding to the first text and a second wordvector sequence corresponding to the second text.

It should be noted that the operation of this step is practicallyidentical to the operation of the step 201, and is not repeated any moreherein.

Step 502, inputting the first word vector sequence and the second wordvector sequence respectively into a pre-trained convolutional neuralnetwork containing at least one multi-scale convolutional layer,identifying vector sequences in a plurality of vector sequencesoutputted by a last multi-scale convolutional layer in the at least onemulti-scale convolutional layer as eigenvector sequences, to obtaineigenvector sequence groups respectively corresponding to the texts.

In this embodiment, the electronic device may store a pre-trainedconvolutional neural network containing at least one multi-scaleconvolutional layer, where the convolutional neural network may be usedfor extracting characteristics of texts. The electronic device may firstinput the first word vector sequence and the second word vector sequencerespectively into the pre-trained convolutional neural network, and thenidentify vector sequences in a plurality of vector sequences outputtedby a last multi-scale convolutional layer in the at least onemulti-scale convolutional layer as eigenvector sequences, to obtaineigenvector sequence groups respectively corresponding to the texts.

In this embodiment, a deep coherent layer and a pooling layer arearranged between two adjacent multi-scale convolutional layers in the atleast one multi-scale convolutional layer, the deep coherent layer isused for combining a plurality of vector sequences outputted by themulti-scale convolutional layer to generate a combined vector sequenceconsisting of a plurality of combined vectors, and the pooling layer isused for analyzing the combined vector sequences generated by the deepcoherent layer in a preset window size (for example, if the window sizeis 2, then two combined vectors are extracted each time as inputs of thepooling layer) and a preset window sliding step length (for example, ifthe window sliding step length is 2, then every other 2 combined vectorsare extracted) to obtain simplified combined vector sequences.

As an example, two multi-scale convolutional layers are respectively afirst multi-scale convolutional layer and a second multi-scaleconvolutional layer, where the first multi-scale convolutional layer mayoutput a first vector sequence (e.g., consisting of 100 10-dimensionalvectors), a second vector sequence (e.g., consisting of 10020-dimensional vectors) and a third vector sequence (e.g., consisting of100 30-dimensional vectors). The first multi-scale convolutional layeris connected to a deep coherent layer, the deep coherent layer isconnected to a pooling layer, the pooling layer is connected to thesecond multi-scale convolutional layer, and the pooling layer has apreset window size of 2 and a preset window sliding step length of 2.The deep coherent layer may combine the first vector sequence, thesecond vector sequence and the third vector sequence outputted by thefirst multi-scale convolutional layer, identify the vector sequence(consisting of 100 60-dimensional vectors) obtained by combination as acombined vector sequence, and input the combined vector sequence to thepooling layer. The pooling layer may first extract, according to thewindow size and the window sliding step length, a maximum value in eachdimension of a first vector and a second vector in the combined vectorsequence to generate a new vector; extract a maximum value in eachdimension of a third vector and a fourth vector in the combined vectorsequence to generate another new vector, and so on; obtain a vectorsequence consisting of the generated new vectors (consisting of 5060-dimensional vectors); and finally input the generated vector sequenceinto the second multi-scale convolutional layer.

Step 503, combining eigenvector sequences in the identified eigenvectorsequence group corresponding to each text to generate a combinedeigenvector sequence corresponding to the each text.

In this embodiment, the electronic device may combine eigenvectorsequences in the identified eigenvector sequence group corresponding toeach text (i.e., each text of the first text and the second text) togenerate a combined eigenvector sequence corresponding to the each text.Specifically, the electronic device may determine, for each text, anorder of vectors forming eigenvector sequences corresponding to the eachtext in the corresponding eigenvector sequences, combine vectors in anidentical order in the eigenvector sequences into a vector, and use thecombined vector as a combined eigenvector, to generate a combinedeigenvector sequence corresponding to the each text.

Step 504, extracting, for each text, a maximum value in each dimensionof the eigenvectors contained in the combined eigenvector sequencecorresponding to the each text, to generate a target eigenvectorcorresponding to the each text.

In this embodiment, the electronic device may first extract, for eachtext, a maximum value in each dimension of the eigenvectors contained inthe combined eigenvector sequence corresponding to the each text, andidentify vectors consisting of the extracted maximum value in eachdimension as a target eigenvector corresponding to the each text, toobtain a target eigenvector corresponding to the first text and a targeteigenvector corresponding to the second text.

Step 505, inputting the generated target eigenvectors into a pre-trainedsimilarity prediction model to obtain similarity prediction result ofthe first text and the second text.

In this embodiment, the electronic device may input the generated targeteigenvectors into a pre-trained similarity prediction model to obtainsimilarity prediction result of the first text and the second text,where the similarity prediction result may be a value. It should benoted that the similarity prediction model may be used forcharacterizing a corresponding relationship between target eigenvectorsequences of a plurality of texts and similarity prediction results ofthe plurality of texts. As an example, the similarity prediction modelmay be a list of corresponding relationships pre-established bytechnical personnel based on statistics of lots of target eigenvectorsand similarity prediction results and storing correspondingrelationships between a plurality of target eigenvector groups andsimilarity prediction results.

In some optional modes of implementing this embodiment, the similarityprediction model may also be generated by training in the followingways:

First, a preset training sample may be extracted, where the trainingsample may include a first training text, a second training text, and anidentifier for indicating whether the first training text is similar tothe second training text.

Then, the first training text and the second training text are analyzedto generate target eigenvectors respectively corresponding to the firsttraining sample and the second training sample. It should be noted thatthe electronic device may generate target eigenvectors respectivelycorresponding to the first training sample and the second trainingsample using a method practically identical to that of the step 201 tothe step 203, which is not repeated any more herein.

Finally, a similarity prediction model may be obtained by training usinga machine learning method, using the target eigenvectors respectivelycorresponding to the first training sample and the second trainingsample as inputs, and using the identifier as an input. It should benoted that the electronic device may obtain the similarity predictionmodel by training using an classification model, such as a naiveBayesian model (NBM) or a support vector machine (SVM), or using aclassification function (e.g., a softmax function).

Step 506, determining whether the first text and the second text pass asimilarity check based on the obtained similarity prediction result.

In this embodiment, the electronic device may determine whether thefirst text and the second text pass a similarity check based on theobtained similarity prediction result. Specifically, if the obtainedsimilarity prediction result is greater than a preset value (e.g., 0.5or 0.8 or the like), then the electronic device determines the firsttext and the second text passing the similarity check; if the obtainedsimilarity prediction result is not greater than the preset value, thenthe electronic device determines the first text and the second textfailing to pass the similarity check.

As can be seen from FIG. 5, compared with the embodiment correspondingto FIG. 5, the flow process 500 of the method for checking a text inthis embodiment highlights analyzing combined eigenvector sequencesbased on a similarity prediction model. Therefore, the solutiondescribed in this embodiment further improves the flexibility andaccuracy in checking a text.

Further referring to FIG. 6, as implementation of the method shown inthe figures, the disclosure provides an embodiment of an apparatus forchecking a text, the embodiment of the apparatus corresponds to theembodiment of the method shown in FIG. 2, and the apparatus may bespecifically applied in a variety of electronic devices.

As shown in FIG. 6, the apparatus 600 for checking a text according tothis embodiment includes: a lexer unit 601, configured for lexing afirst to-be-checked text and a second to-be-checked text respectively,and determining word vectors of the lexed words to generate a first wordvector sequence corresponding to the first text and a second word vectorsequence corresponding to the second text; an input unit 602, configuredfor inputting the first word vector sequence and the second word vectorsequence respectively into a pre-trained convolutional neural networkcontaining at least one multi-scale convolutional layer, identifyingvector sequences in a plurality of vector sequences outputted by a lastmulti-scale convolutional layer in the at least one multi-scaleconvolutional layer as eigenvector sequences, to obtain eigenvectorsequence groups respectively corresponding to the texts, where theconvolutional neural network is used for extracting characteristics oftexts; a combination unit 603, configured for combining eigenvectorsequences in the identified eigenvector sequence group corresponding toeach text to generate a combined eigenvector sequence corresponding tothe each text; and an analysis unit 604, configured for analyzing thegenerated combined eigenvector sequences to determine whether the firsttext and the second text pass a similarity check.

In this embodiment, the lexer unit 601 may first extract a firstto-be-checked text and a second to-be-checked text. The lexer unit 601may lex the first text and the second text using a variety of lexmethods; and then determine word vectors of the lexed words using avariety of word vector generation methods, to generate a first wordvector sequence corresponding to the first text and a second word vectorsequence corresponding to the second text.

In this embodiment, the input unit 602 may first input the first wordvector sequence and the second word vector sequence respectively into apre-trained convolutional neural network containing at least onemulti-scale convolutional layer, and then identify vector sequences in aplurality of vector sequences outputted by a last multi-scaleconvolutional layer in the at least one multi-scale convolutional layeras eigenvector sequences, to obtain eigenvector sequence groupsrespectively corresponding to the texts.

In this embodiment, the combination unit 603 may combine eigenvectorsequences in the identified eigenvector sequence group corresponding toeach text (i.e., each text of the first text and the second text), togenerate a combined eigenvector sequence corresponding to the each text.Specifically, the combination unit 603 may determine, for each text, anorder of vectors forming eigenvector sequences corresponding to the eachtext in the corresponding eigenvector sequences, combine vectors in anidentical order in the eigenvector sequences into a vector, and use thecombined vector as a combined eigenvector, to generate a combinedeigenvector sequence corresponding to the each text.

In some optional modes of implementing this embodiment, a deep coherentlayer and a pooling layer are arranged between adjacent multi-scaleconvolutional layers in the at least one multi-scale convolutionallayer, the deep coherent layer may be used for combining a plurality ofvector sequences outputted by the multi-scale convolutional layer togenerate a combined vector sequence consisting of a plurality ofcombined vectors, and the pooling layer may be used for analyzing thecombined vector sequence generated by the deep coherent layer in apreset window size and a preset window sliding step length to obtain asimplified combined vector sequence.

In this embodiment, the analysis unit 604 may implement numericalanalysis of the generated combined eigenvector sequence using a varietyof analysis methods to determine whether the first text and the secondtext pass a similarity check.

In some optional modes of implementing this embodiment, the analysisunit 604 may include a generation module and a determination module (notshown in the figure), where the generation module may be configured forextracting, for each text, a maximum value in each dimension of theeigenvectors contained in a combined eigenvector sequence correspondingto the each text, to generate a target eigenvector corresponding to theeach text; and the determination module may be configured fordetermining whether the first text and the second text pass thesimilarity check based on the generated target eigenvectorscorresponding to the texts.

In some optional modes of implementing this embodiment, thedetermination module may be further configured for inputting thegenerated target eigenvectors into a pre-trained similarity predictionmodel to obtain similarity prediction result of the first text and thesecond text, where the similarity prediction model is used forcharacterizing a correspondence relationship between target eigenvectorsequences of a plurality of texts and similarity prediction results ofthe plurality of texts; and determining whether the first text and thesecond text pass a similarity check based on the obtained similarityprediction result.

In some optional modes of implementing this embodiment, the apparatusmay further include an extraction unit, a generation unit and a trainingunit (not shown in the figure), where the extraction unit may beconfigured for extracting a preset training sample, where the trainingsample includes a first training text, a second training text, and anidentifier for indicating whether the first training text is similar tothe second training text; the generation unit may be configured foranalyzing the first training text and the second training text togenerate target eigenvectors respectively corresponding to the firsttraining sample and the second training sample; and the training unitmay be configured for obtaining a similarity prediction model bytraining using a machine learning method, using the target eigenvectorsrespectively corresponding to the first training sample and the secondtraining sample as inputs, and using the identifier as an input.

In some optional modes of implementing this embodiment, thedetermination module may be further configured for determining asimilarity between a target eigenvector corresponding to the first textand a target eigenvector corresponding to the second text; anddetermining the first text and the second text passing a similaritycheck in response to determining the similarity being greater than apreset similarity threshold; determining the first text and the secondtext failing to pass the similarity check in response to determining thesimilarity being not greater than the similarity threshold.

In the apparatus provided in the embodiments of the disclosure, thelexer unit 601 lexes a first to-be-checked text and a secondto-be-checked text respectively to generate a first word vector sequenceand a second word vector sequence; the input unit 602 inputs the firstword vector sequence and the second word vector sequence respectivelyinto a pre-trained convolutional neural network containing at least onemulti-scale convolutional layer, to obtain eigenvector sequence groupsrespectively corresponding to the texts; the combination unit 603combines eigenvector sequences to generate combined eigenvectorsequences corresponding to the texts; and finally the analysis unit 604analyzes the generated combined eigenvector sequences to determinewhether the first text and the second text pass the similarity check,thereby implementing the calculation of multi-scale convolution of wordvector sequences, and improving the flexibility in checking a textrelative to the calculation of single fixed-scale convolution. Moreover,because of using the calculation of multi-scale convolution, the abilityto extract characteristics of texts is enhanced, and then the accuracyin checking text similarity is improved.

Below referring to FIG. 7, a structural diagram of a computer system 700of a server applicable for implementing embodiments of the disclosure isshown. The server shown in FIG. 7 is only an example, and shall notlimit the functions and serviceable range of embodiments of thedisclosure in any way.

As shown in FIG. 7, the computer system 700 includes a centralprocessing unit (CPU) 701, which may execute various appropriate actionsand processes in accordance with a program stored in a read-only memory(ROM) 702 or a program loaded into a random access memory (RAM) 703 froma storage portion 708. The RAM 703 also stores various programs and datarequired by operations of the system 700. The CPU 701, the ROM 702 andthe RAM 703 are connected to each other through a bus 704. Aninput/output (I/O) interface 705 is also connected to the bus 704.

The following components are connected to the I/O interface 705: aninput portion 706 including a keyboard, a mouse etc.; an output portion707 comprising a cathode ray tube (CRT), a liquid crystal display device(LCD), a speaker etc.; a storage portion 708 including a hard disk andthe like; and a communication portion 709 comprising a network interfacecard, such as a LAN card and a modem. The communication portion 709performs communication processes via a network, such as the Internet. Adrive 710 is also connected to the I/O interface 705 as required. Aremovable medium 711, such as a magnetic disk, an optical disk, amagneto-optical disk, and a semiconductor memory, may be installed onthe drive 710, to facilitate the retrieval of a computer program fromthe removable medium 711, and the installation thereof on the storageportion 708 as needed.

In particular, according to embodiments of the present disclosure, theprocess described above with reference to the flow chart may beimplemented in a computer software program. For example, an embodimentof the present disclosure includes a computer program product, whichcomprises a computer program that is tangibly embedded in amachine-readable medium. The computer program comprises program codesfor executing the method as illustrated in the flow chart. In such anembodiment, the computer program may be downloaded and installed from anetwork via the communication portion 709, and/or may be installed fromthe removable media 711. The computer program, when executed by thecentral processing unit (CPU) 701, implements the above mentionedfunctionalities as defined by the methods of the present disclosure. Itshould be noted that the computer readable medium in the presentdisclosure may be computer readable storage medium. An example of thecomputer readable storage medium may include, but not limited to:semiconductor systems, apparatus, elements, or a combination any of theabove. A more specific example of the computer readable storage mediummay include but is not limited to: electrical connection with one ormore wire, a portable computer disk, a hard disk, a random access memory(RAM), a read only memory (ROM), an erasable programmable read onlymemory (EPROM or flash memory), a fibre, a portable compact disk readonly memory (CD-ROM), an optical memory, a magnet memory or any suitablecombination of the above. In the present disclosure, the computerreadable storage medium may be any physical medium containing or storingprograms which can be used by a command execution system, apparatus orelement or incorporated thereto. The computer readable medium may be anycomputer readable medium except for the computer readable storagemedium. The computer readable medium is capable of transmitting,propagating or transferring programs for use by, or used in combinationwith, a command execution system, apparatus or element. The programcodes contained on the computer readable medium may be transmitted withany suitable medium including but not limited to: wireless, wired,optical cable, RF medium etc., or any suitable combination of the above.

The flow charts and block diagrams in the accompanying drawingsillustrate architectures, functions and operations that may beimplemented according to the systems, methods and computer programproducts of the various embodiments of the present disclosure. In thisregard, each of the blocks in the flow charts or block diagrams mayrepresent a module, a program segment, or a code portion, said module,program segment, or code portion comprising one or more executableinstructions for implementing specified logic functions. It should alsobe noted that, in some alternative implementations, the functionsdenoted by the blocks may occur in a sequence different from thesequences shown in the figures. For example, any two blocks presented insuccession may be executed, substantially in parallel, or they maysometimes be in a reverse sequence, depending on the function involved.It should also be noted that each block in the block diagrams and/orflow charts as well as a combination of blocks may be implemented usinga dedicated hardware-based system executing specified functions oroperations, or by a combination of a dedicated hardware and computerinstructions.

The units or modules involved in the embodiments of the presentapplication may be implemented by means of software or hardware. Thedescribed units or modules may also be provided in a processor, forexample, described as: a processor, comprising a lexer unit, an inputunit, a combination unit and an analysis unit, where the names of theseunits or modules do not in some cases constitute a limitation to suchunits or modules themselves. For example, the lexer unit may also bedescribed as “a unit for lexing a first to-be-checked text and a secondto-be-checked text.”

In another aspect, the present application further provides anon-volatile computer-readable storage medium. The non-volatilecomputer-readable storage medium may be the non-volatilecomputer-readable storage medium included in the apparatus in the abovedescribed embodiments, or a stand-alone non-volatile computer-readablestorage medium not assembled into the apparatus. The non-volatilecomputer-readable storage medium stores one or more programs. The one ormore programs, when executed by a device, cause the device to: lex afirst to-be-checked text and a second to-be-checked text respectively,determine word vectors of the lexed words to generate a first wordvector sequence corresponding to the first text and a second word vectorsequence corresponding to the second text; input the first word vectorsequence and the second word vector sequence respectively into apre-trained convolutional neural network containing at least onemulti-scale convolutional layer, identify vector sequences in aplurality of vector sequences outputted by a last multi-scaleconvolutional layer in the at least one multi-scale convolutional layeras eigenvector sequences, to obtain eigenvector sequence groupscorresponding to the texts; combine eigenvector sequences in theidentified eigenvector sequence group to generate a combined eigenvectorsequence; and analyze the generated combined eigenvector sequences todetermine whether the first text and the second text pass a similaritycheck.

The above description only provides an explanation of the preferredembodiments of the present application and the technical principlesused. It should be appreciated by those skilled in the art that theinventive scope of the present application is not limited to thetechnical solutions formed by the particular combinations of theabove-described technical features. The inventive scope should alsocover other technical solutions formed by any combinations of theabove-described technical features or equivalent features thereofwithout departing from the concept of the disclosure. Technical schemesformed by the above-described features being interchanged with, but notlimited to, technical features with similar functions disclosed in thepresent application are examples.

What is claimed is:
 1. An artificial intelligence based method forchecking a text, the method comprising: lexing a first to-be-checkedtext and a second to-be-checked text respectively to obtain lexed words,determining word vectors of the lexed words to generate a first wordvector sequence corresponding to the first text and a second word vectorsequence corresponding to the second text; inputting the first wordvector sequence and the second word vector sequence respectively into apre-trained convolutional neural network containing at least onemulti-scale convolutional layer, identifying vector sequences in aplurality of vector sequences outputted by a last multi-scaleconvolutional layer in the at least one multi-scale convolutional layeras eigenvector sequences, to obtain eigenvector sequence groupsrespectively corresponding to the texts, wherein the convolutionalneural network is used for extracting characteristics of texts;combining eigenvector sequences in the obtained eigenvector sequencegroup corresponding to each text to generate a combined eigenvectorsequence corresponding to each text; and analyzing the generatedcombined eigenvector sequences to determine whether the first text andthe second text pass a similarity check.
 2. The method for checking atext according to claim 1, wherein the analyzing the generated combinedeigenvector sequences to determine whether the first text and the secondtext pass a similarity check comprises: extracting, for each text, amaximum value in each dimension of the eigenvectors contained in acombined eigenvector sequence corresponding to each text, to generate atarget eigenvector corresponding to the each text; and determiningwhether the first text and the second text pass the similarity checkbased on the generated target eigenvectors corresponding to the texts.3. The method for checking a text according to claim 2, wherein thedetermining whether the first text and the second text pass thesimilarity check based on the generated target eigenvectorscorresponding to the texts comprises: inputting the generated targeteigenvectors into a pre-trained similarity prediction model to obtainsimilarity prediction result of the first text and the second text,wherein the similarity prediction model is used for characterizing acorresponding relationship between target eigenvector sequences of aplurality of texts and similarity prediction results of the plurality oftexts; and determining whether the first text and the second text passthe similarity check based on the obtained similarity prediction result.4. The method for checking a text according to claim 3, wherein themethod further comprises training the similarity prediction model,comprising: extracting a preset training sample, wherein the trainingsample comprises a first training text, a second training text, and anidentifier for indicating whether the first training text is similar tothe second training text; analyzing the first training text and thesecond training text to generate target eigenvectors respectivelycorresponding to the first training sample and the second trainingsample; and obtaining the similarity prediction model by training usinga machine learning method, using the target eigenvectors respectivelycorresponding to the first training sample and the second trainingsample as inputs, and using the identifier as an input.
 5. The methodfor checking a text according to claim 2, wherein the determiningwhether the first text and the second text pass the similarity checkbased on the generated target eigenvectors corresponding to the textscomprises: determining a similarity between a target eigenvectorcorresponding to the first text and a target eigenvector correspondingto the second text; determining the first text and the second textpassing the similarity check in response to determining the similaritybeing greater than a preset similarity threshold; and determining thefirst text and the second text failing to pass the similarity check inresponse to determining the similarity being not greater than thesimilarity threshold.
 6. The method for checking a text according toclaim 1, wherein a deep coherent layer and a pooling layer are arrangedbetween adjacent multi-scale convolutional layers in the at least onemulti-scale convolutional layer, the deep coherent layer is used forcombining a plurality of vector sequences outputted by the multi-scaleconvolutional layer to generate a combined vector sequence consisting ofa plurality of combined vectors, and the pooling layer is used foranalyzing the combined vector sequence generated by the deep coherentlayer in a preset window size and a preset window sliding step length toobtain a simplified combined vector sequence.
 7. An artificialintelligence based apparatus for checking a text, the apparatuscomprising: at least one processor; and a memory storing instructions,the instructions when executed by the at least one processor, cause theat least one processor to perform operations, the operations comprising:lexing a first to-be-checked text and a second to-be-checked textrespectively to obtain lexed words, determining word vectors of thelexed words to generate a first word vector sequence corresponding tothe first text and a second word vector sequence corresponding to thesecond text; inputting the first word vector sequence and the secondword vector sequence respectively into a pre-trained convolutionalneural network containing at least one multi-scale convolutional layer,identifying vector sequences in a plurality of vector sequencesoutputted by a last multi-scale convolutional layer in the at least onemulti-scale convolutional layer as eigenvector sequences, to obtaineigenvector sequence groups respectively corresponding to the texts,wherein the convolutional neural network is used for extractingcharacteristics of texts; combining eigenvector sequences in theobtained eigenvector sequence group corresponding to each text togenerate a combined eigenvector sequence corresponding to each text; andanalyzing the generated combined eigenvector sequences to determinewhether the first text and the second text pass a similarity check. 8.The apparatus for checking a text according to claim 7, wherein theanalyzing the generated combined eigenvector sequences to determinewhether the first text and the second text pass a similarity checkcomprises: extracting, for each text, a maximum value in each dimensionof the eigenvectors contained in a combined eigenvector sequencecorresponding to the each text, to generate a target eigenvectorcorresponding to the each text; and determining whether the first textand the second text pass the similarity check based on the generatedtarget eigenvectors corresponding to the texts.
 9. The apparatus forchecking a text according to claim 8, wherein the determining whetherthe first text and the second text pass the similarity check based onthe generated target eigenvectors corresponding to the texts comprises:inputting the generated target eigenvectors into a pre-trainedsimilarity prediction model to obtain similarity prediction result ofthe first text and the second text, wherein the similarity predictionmodel is used for characterizing a corresponding relationship betweentarget eigenvector sequences of a plurality of texts and similarityprediction results of the plurality of texts; and determining whetherthe first text and the second text pass the similarity check based onthe obtained similarity prediction result.
 10. The apparatus forchecking a text according to claim 9, wherein the operations furthercomprise training the similarity prediction model, comprising:extracting a preset training sample, wherein the training samplecomprises a first training text, a second training text, and anidentifier for indicating whether the first training text is similar tothe second training text; analyzing the first training text and thesecond training text to generate target eigenvectors respectivelycorresponding to the first training sample and the second trainingsample; and obtaining the similarity prediction model by training usinga machine learning method, using the target eigenvectors respectivelycorresponding to the first training sample and the second trainingsample as inputs, and using the identifier as an input.
 11. Theapparatus for checking a text according to claim 8, wherein thedetermining whether the first text and the second text pass thesimilarity check based on the generated target eigenvectorscorresponding to the texts comprises: determining a similarity between atarget eigenvector corresponding to the first text and a targeteigenvector corresponding to the second text; determining the first textand the second text passing the similarity check in response todetermining the similarity being greater than a preset similaritythreshold; and determining the first text and the second text failing topass the similarity check in response to determining the similaritybeing not greater than the similarity threshold.
 12. The apparatus forchecking a text according to claim 7, wherein a deep coherent layer anda pooling layer are arranged between adjacent multi-scale convolutionallayers in the at least one multi-scale convolutional layer, the deepcoherent layer is used for combining a plurality of vector sequencesoutputted by the multi-scale convolutional layer to generate a combinedvector sequence consisting of a plurality of combined vectors, and thepooling layer is used for analyzing the combined vector sequencegenerated by the deep coherent layer in a preset window size and apreset window sliding step length to obtain a simplified combined vectorsequence.
 13. A non-transitory computer storage medium storing acomputer program, the computer program when executed by one or moreprocessors, causes the one or more processors to perform operations, theoperations comprising: lexing a first to-be-checked text and a secondto-be-checked text respectively to obtain lexed words, determining wordvectors of the lexed words to generate a first word vector sequencecorresponding to the first text and a second word vector sequencecorresponding to the second text; inputting the first word vectorsequence and the second word vector sequence respectively into apre-trained convolutional neural network containing at least onemulti-scale convolutional layer, identifying vector sequences in aplurality of vector sequences outputted by a last multi-scaleconvolutional layer in the at least one multi-scale convolutional layeras eigenvector sequences, to obtain eigenvector sequence groupsrespectively corresponding to the texts, wherein the convolutionalneural network is used for extracting characteristics of texts;combining eigenvector sequences in the obtained eigenvector sequencegroup corresponding to each text to generate a combined eigenvectorsequence corresponding to each text; and analyzing the generatedcombined eigenvector sequences to determine whether the first text andthe second text pass a similarity check.